package ase.eleitweg;

import ase.eleitweg.common.*;
import java.util.*;
import java.io.*;
import ase.eleitweg.server.db.*;

public class SerializeWF {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		ELeitwegDAO db = DatabaseFactory.getDB();
		List<Workflow> testData = db.getAllWorkflows();
		File f = new File(System.getProperty("user.dir") + "/dataTestFilled/TestWFs.bin");
		System.out.println(f.exists());
		System.out.println(f.getCanonicalPath());
		System.out.println(f.createNewFile());
		FileOutputStream fos = new FileOutputStream(f);
		ObjectOutputStream oos = new ObjectOutputStream(fos);
		oos.writeObject(testData);
		oos.close();
		fos.close();

	}

}
